﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OpenQuarters.WebQuarters.Modules.Blog;
using OpenQuarters.WebQuarters.Modules.ItemList;

namespace OpenQuarters.WebQuarters.Modules.Blog
{
    partial class BlogComment : BlogEntity<BlogComment, long>
    {
        public override long GetKey(BlogComment Entity)
        {
            return Entity.BlogCommentId;
        }

        public override System.Linq.Expressions.Expression<Func<BlogComment, bool>> GetIDSelector(long ID)
        {
            return e => e.BlogCommentId == ID;
        }

        [Newtonsoft.Json.JsonProperty]
        public string Url
        {
            get
            {
                return this.BlogPost.Url + "#comment" + this.BlogCommentId.ToString();
            }
        }
    }
}